<template>
    <el-text type="danger" size="large">2,添加到子容器上的语法 flex-shrink : 一个数字，规定项目将相对于其他灵活的项目进行收缩的量,默认1,0表示不收缩{flex-basis是设置一个具体值}</el-text>
    <div class="content_box">
        <div class="child_content_box">
            <el-text>在最后一个盒子添加flex-shrink:0</el-text>
            <div class="before_box">
                <div class="child_before_box">1</div>
                <div class="child_before_box">2</div>
                <div class="child_before_box">3</div>
                <div class="child_before_box" style="flex-shrink: 0;">4</div>
                <div class="child_before_box">5</div>
                <div class="child_before_box">6</div>
            
            </div>
        </div>
    </div>
</template>
<script setup >

</script>
<style scoped lang="scss">
.content_box {
    display: flex;
    flex-wrap: wrap;
}

.child_content_box {
    margin: 5px;
}

.before_box {
    width: 200px;
    height: 200px;
    border: 2px solid #E4E7ED;
    display: flex;
}

.child_before_box {
    width: 40px;
    height: 40px;
    margin: 2px;
    background-color: red;
}

.child_before_box:nth-child(2) {
    background-color: #F56C6C;
}

.child_before_box:nth-child(3) {
    background-color: yellow;
}

.child_before_box:nth-child(4) {
    background-color: green;
}
</style>